package org.nbict.iot.trash;

import org.apache.storm.topology.BasicOutputCollector;
import org.apache.storm.topology.OutputFieldsDeclarer;
import org.apache.storm.topology.base.BaseBasicBolt;
import org.apache.storm.tuple.Fields;
import org.apache.storm.tuple.Tuple;

/**
 * S1
 * 校验错误报文输出器
 * Created by songseven on 18/6/13.
 */
@Deprecated
public class S1Bolt extends BaseBasicBolt {
    @Override
    public void execute(Tuple input, BasicOutputCollector
            collector) {

        byte[] raw = input.getBinaryByField("raw");
        System.out.println("S1 ===> " + raw);

        //TODO 需要写入存储介质
    }
    @Override
    public void declareOutputFields(OutputFieldsDeclarer declarer) {
        declarer.declare(new Fields("error"));
    }
}
